//
//  UIColor-Extention.swift
//  斗鱼直播Swift
//
//  Created by admin on 2018/2/24.
//  Copyright © 2018年 admin. All rights reserved.
//

import UIKit
extension UIColor {
    convenience init (r : CGFloat, g : CGFloat , b : CGFloat) {
        self.init(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: 1)
    }
    
    class func randomColor () -> UIColor {
        return UIColor.init(red: CGFloat (arc4random_uniform(255) / 255), green: CGFloat (arc4random_uniform(255) / 255), blue: CGFloat (arc4random_uniform(255) / 255), alpha: 1)
    }
}
